import request from '@/axios'

export const videoTypePageListApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideoType/getSysVideoTypePageList', data })
}
export const videoTypeListApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideoType/getSysVideoTypeList', data })
}
export const addVideoTypeApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideoType/addSysVideoType', data })
}
export const editVideoTypeApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideoType/updateSysVideoType', data })
}
export const delSysVideoTypeApi = (params): Promise<IResponse> => {
  return request.get({ url: '/sysVideoType/delSysVideoType', params })
}

export const addVideoDetailApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideo/addSysVideo', data })
}
export const editVideoDetailApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideo/updateSysVideo', data })
}
export const delSysVideoDetailApi = (params): Promise<IResponse> => {
  return request.get({ url: '/sysVideo/delSysVideo', params })
}
export const videoDetailPageListApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideo/getSysVideoPageList', data })
}

export const createMultipartUpload = (params) => {
  return request.get({
    url: '/uploadFile/createMultipartUpload',
    params
  })
}

export function completeMultipartUpload(params) {
  return request.get({
    url: '/uploadFile/completeMultipartUpload',
    params
  })
}
export const addBatchSysVideoApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideo/addBatchSysVideo', data })
}
export const generateAudioApi = (data): Promise<IResponse> => {
  return request.post({ url: '/sysVideo/generateAudio', data })
}
export function updateThumbnailImageApi(params) {
  return request.get({
    url: '/sysVideo/updateThumbnailImage',
    params
  })
}
//4个card 统计
export function textDescriptionApi(params) {
  return request.get({
    url: '/sysUserStudyTime/textDescription',
    params
  })
}
//4个card 统计
export function monthWatchTimeApi(params) {
  return request.get({
    url: '/sysUserStudyTime/monthWatchTime',
    params
  })
}
export function weekThreeWatchTimeApi(params) {
  return request.get({
    url: '/sysUserStudyTime/weekThreeWatchTime',
    params
  })
}
export function lastThreeYearApi(params) {
  return request.get({
    url: '/sysUserStudyTime/lastThreeYear',
    params
  })
}
